﻿# This is a sample Python script.

# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
# import gchen_pack
import gchen_pack.Study
import os
import Tool
import sys

def print_hi(name):
    print(gchen_pack.Study.HelloWorld())
    # Use a breakpoint in the code line below to debug your script.
    print('Hi, {%s}'% name)  # Press Ctrl+F8 to toggle the breakpoint.

def test_svn():
    strSvnCmd = r"svn stat D:\A_Work\File\wowii\AB\ --xml  --username dabaoji --password woowii.0302 --no-auth-cache"

    testPath = r"D:\A_Work\File\wowii\AB\a.txt"
    revertCmd = 'svn revert ' + testPath

    ret, output = Tool.call(strSvnCmd)
    if ret != 0:
        print(output)

    nResult = output.find('?')
    print("nResult %s" % nResult)
    if output.find('entry') == 0:
        print("-- ?")
    # output = output.encode('utf-8')
    print(type(output))
    print(ret)
    print(output)


# Press the green button in the gutter to run the script.
if __name__ == '__main__':
    test_svn()

# See PyCharm help at https://www.jetbrains.com/help/pycharm/
